<template>
	<div class="export-container" v-loading="fullscreenLoading" element-loading-spinner="el-icon-loading"
		element-loading-background="rgba(255,255,255,0.5)" :element-loading-text="$t('message.bhView.loading')">
		<!-- 第一行 -->
		<div class="nav">
			<!-- <div class="tabs-container">
				<el-radio v-model="fileRadio" label="1">{{
						$t("message.reportFrom.exportFileRadio.radioPdf")
				}}</el-radio>
				<el-radio v-model="fileRadio" label="2">{{
						$t("message.reportFrom.exportFileRadio.radioExcel")
				}}</el-radio>
			</div> -->
			<!-- <div :class="
				radioDisabledTop
					? 'isSelect tabs-container'
					: 'tabs-container'
			">
				<el-radio v-model="selectRadio" label="1">{{
						$t("message.reportFrom.exportSelectRadio.justSelected")
				}}</el-radio>
				<el-radio v-model="selectRadio" label="2">{{
						$t("message.reportFrom.exportSelectRadio.allSelected")
				}}</el-radio>
			</div> -->
		</div>

		<!-- Export Item -->
		<div class="export-item-container">
			<div class="item-container" v-for="(Itme, index) in export_item_arr" :key="index">
				<div class="item-nth-child">
					<el-checkbox v-if="index == 0" @change="isChange" v-model="Itme.titleFlg">{{ Itme.title
						}}</el-checkbox>
					{{ index == 0 ? '' : Itme.title }}
				</div>
				<div v-for="(i, _index) in Itme.children" :key="_index">
					<el-checkbox v-if="index == 1 && i.titleFlg1" v-model="i.titleFlg"
						style="margin-top: 20px;transform: translateX(15px) translateY(-8px); "
						@change="isChangeLineNo"></el-checkbox>
					
					<el-checkbox v-if="index == 5 && i.titleFlg2" v-model="i.titleFlg"
						style="margin-top: 20px;transform: translateX(15px) translateY(-8px); "
						@change="isChangeSysIntelligence"></el-checkbox>

					<el-button class="item" @click="exportItem(i)"
						:disabled="index == 0 && _index == 0 && Itme.titleFlg ? false : (i.btn || i.tempDis)">
						{{ i.title }}
					</el-button>
				</div>
			</div>
		</div>

		<AAExport v-if="export_dialog_flag && this.title == $t('message.reportFrom.exportItemTitle01')"
			@CloseExprotDiloag="export_dialog_flag = false" :title="title" :fileRadio="fileRadio" :fileTypeStr="fileRadio == 1
				? $t('message.reportFrom.exportFileRadio.radioPdf')
				: $t('message.reportFrom.exportFileRadio.radioExcel')
				" :selectMacData="selectMacData"></AAExport>

		<ACExport v-if="export_dialog_flag && this.title == $t('message.reportFrom.exportItemTitle03')"
			@CloseExprotDiloag="export_dialog_flag = false" :title="title" :fileRadio="fileRadio" :fileTypeStr="fileRadio == 1
				? $t('message.reportFrom.exportFileRadio.radioPdf')
				: $t('message.reportFrom.exportFileRadio.radioExcel')
				" :selectMacData="selectMacData"></ACExport>

		<BAExport v-if="export_dialog_flag && this.title == $t('message.reportFrom.exportItemTitle11')"
			@CloseExprotDiloag="export_dialog_flag = false" :title="title" :fileRadio="fileRadio" :fileTypeStr="fileRadio == 1
				? $t('message.reportFrom.exportFileRadio.radioPdf')
				: $t('message.reportFrom.exportFileRadio.radioExcel')
				" :selectMacData="selectMacData"></BAExport>
		<BBExport v-if="export_dialog_flag && this.title == $t('message.reportFrom.exportItemTitle12')"
			@CloseExprotDiloag="export_dialog_flag = false" :title="title" :fileRadio="fileRadio" :fileTypeStr="fileRadio == 1
				? $t('message.reportFrom.exportFileRadio.radioPdf')
				: $t('message.reportFrom.exportFileRadio.radioExcel')
				" :selectMacData="selectMacData"></BBExport>
		<BCExport v-if="export_dialog_flag && this.title == $t('message.reportFrom.exportItemTitle_12')"
			@CloseExprotDiloag="export_dialog_flag = false" :title="title" :fileRadio="fileRadio" :fileTypeStr="fileRadio == 1
				? $t('message.reportFrom.exportFileRadio.radioPdf')
				: $t('message.reportFrom.exportFileRadio.radioExcel')
				" :selectMacData="selectMacData"></BCExport>
		<BDExport v-if="export_dialog_flag && this.title == $t('message.reportFrom.exportItemTitle13')"
			@CloseExprotDiloag="export_dialog_flag = false" :title="title" :fileRadio="fileRadio" :fileTypeStr="fileRadio == 1
				? $t('message.reportFrom.exportFileRadio.radioPdf')
				: $t('message.reportFrom.exportFileRadio.radioExcel')
				" :selectMacData="selectMacData"></BDExport>
		<BEExport v-if="export_dialog_flag && this.title == $t('message.reportFrom.exportItemTitle16')"
			@CloseExprotDiloag="export_dialog_flag = false" :title="title" :fileRadio="fileRadio" :fileTypeStr="fileRadio == 1
				? $t('message.reportFrom.exportFileRadio.radioPdf')
				: $t('message.reportFrom.exportFileRadio.radioExcel')
				" :selectMacData="selectMacData"></BEExport>

		<CAExport v-if="export_dialog_flag && this.title == $t('message.reportFrom.exportItemTitle21')"
			@CloseExprotDiloag="export_dialog_flag = false" :title="title" :fileRadio="fileRadio" :fileTypeStr="fileRadio == 1
				? $t('message.reportFrom.exportFileRadio.radioPdf')
				: $t('message.reportFrom.exportFileRadio.radioExcel')
				" :selectMacData="selectMacData"></CAExport>

		<CBExport v-if="export_dialog_flag && this.title == $t('message.reportFrom.exportItemTitle22')"
			@CloseExprotDiloag="export_dialog_flag = false" :title="title" :fileRadio="fileRadio" :fileTypeStr="fileRadio == 1
				? $t('message.reportFrom.exportFileRadio.radioPdf')
				: $t('message.reportFrom.exportFileRadio.radioExcel')
				" :selectMacData="selectMacData"></CBExport>

		<CCExport v-if="export_dialog_flag && this.title == $t('message.reportFrom.exportItemTitle25')"
			@CloseExprotDiloag="export_dialog_flag = false" :title="title" :fileRadio="fileRadio" :fileTypeStr="fileRadio == 1
				? $t('message.reportFrom.exportFileRadio.radioPdf')
				: $t('message.reportFrom.exportFileRadio.radioExcel')
				" :selectMacData="selectMacData"></CCExport>

		<CDExport v-if="export_dialog_flag && this.title == $t('message.reportFrom.exportItemTitle23')"
			@CloseExprotDiloag="export_dialog_flag = false" :title="title" :fileRadio="fileRadio" :fileTypeStr="fileRadio == 1
				? $t('message.reportFrom.exportFileRadio.radioPdf')
				: $t('message.reportFrom.exportFileRadio.radioExcel')
				" :selectMacData="selectMacData"></CDExport>

		<CEExport v-if="export_dialog_flag && this.title == $t('message.reportFrom.exportItemTitle24')"
			@CloseExprotDiloag="export_dialog_flag = false" :title="title" :fileRadio="fileRadio" :fileTypeStr="fileRadio == 1
				? $t('message.reportFrom.exportFileRadio.radioPdf')
				: $t('message.reportFrom.exportFileRadio.radioExcel')
				" :selectMacData="selectMacData"></CEExport>

		<DAExport style="z-index: 9"
			v-if="export_dialog_flag && this.title == $t('message.reportFrom.exportItemTitle31') && flg == 3"
			@CloseExprotDiloag="export_dialog_flag = false" @ExprotItem="exprotDialogItem" :title="title"
			:fileRadio="fileRadio" :fileTypeStr="fileRadio == 1
				? $t('message.reportFrom.exportFileRadio.radioPdf')
				: $t('message.reportFrom.exportFileRadio.radioExcel')
				" :selectMacData="selectMacData"></DAExport>

		<DBExport style="z-index: 9"
			v-if="export_dialog_flag && this.title == $t('message.reportFrom.exportItemTitle32') && flg == 3"
			@CloseExprotDiloag="export_dialog_flag = false" @ExprotItem="exprotDialogItem" :title="title"
			:fileRadio="fileRadio" :fileTypeStr="fileRadio == 1
				? $t('message.reportFrom.exportFileRadio.radioPdf')
				: $t('message.reportFrom.exportFileRadio.radioExcel')
				" :selectMacData="selectMacData"></DBExport>

		<DCExport style="z-index: 9"
			v-if="export_dialog_flag && this.title == $t('message.reportFrom.exportItemTitle33')"
			@CloseExprotDiloag="export_dialog_flag = false" @ExprotItem="exprotDialogItem" :title="title"
			:fileRadio="fileRadio" :fileTypeStr="fileRadio == 1
				? $t('message.reportFrom.exportFileRadio.radioPdf')
				: $t('message.reportFrom.exportFileRadio.radioExcel')
				" :selectMacData="selectMacData"></DCExport>

		<DDExport style="z-index: 9"
			v-if="export_dialog_flag && this.title == $t('message.reportFrom.exportItemTitle34')"
			@CloseExprotDiloag="export_dialog_flag = false" @ExprotItem="exprotDialogItem" :title="title"
			:fileRadio="fileRadio" :fileTypeStr="fileRadio == 1
				? $t('message.reportFrom.exportFileRadio.radioPdf')
				: $t('message.reportFrom.exportFileRadio.radioExcel')
				" :selectMacData="selectMacData"></DDExport>

		<EAExport style="z-index: 9"
			v-if="export_dialog_flag && this.title == $t('message.reportFrom.exportItemTitle41')"
			@CloseExprotDiloag="export_dialog_flag = false" @ExprotItem="exprotDialogItem" :title="title"
			:fileRadio="fileRadio" :fileTypeStr="fileRadio == 1
				? $t('message.reportFrom.exportFileRadio.radioPdf')
				: $t('message.reportFrom.exportFileRadio.radioExcel')
				" :selectMacData="selectMacData"></EAExport>
		<!-- DB -->
		<export-dialog style="z-index: 9"
			v-if="export_dialog_flag && this.title == $t('message.reportFrom.exportItemTitle42')"
			@CloseExprotDiloag="export_dialog_flag = false" @ExprotItem="exprotDialogItem" :title="title"
			:fileRadio="fileRadio" :fileTypeStr="fileRadio == 1
				? $t('message.reportFrom.exportFileRadio.radioPdf')
				: $t('message.reportFrom.exportFileRadio.radioExcel')
				" :selectMacData="selectMacData"></export-dialog>
		<ECExport style="z-index: 9"
			v-if="export_dialog_flag && this.title == $t('message.reportFrom.exportItemTitle43')"
			@CloseExprotDiloag="export_dialog_flag = false" @ExprotItem="exprotDialogItem" :title="title"
			:fileRadio="fileRadio" :fileTypeStr="fileRadio == 1
				? $t('message.reportFrom.exportFileRadio.radioPdf')
				: $t('message.reportFrom.exportFileRadio.radioExcel')
				" :selectMacData="selectMacData"></ECExport>
		<EDExport style="z-index: 9"
			v-if="export_dialog_flag && this.title == $t('message.reportFrom.exportItemTitle44')"
			@CloseExprotDiloag="export_dialog_flag = false" @ExprotItem="exprotDialogItem" :title="title"
			:fileRadio="fileRadio" :fileTypeStr="fileRadio == 1
				? $t('message.reportFrom.exportFileRadio.radioPdf')
				: $t('message.reportFrom.exportFileRadio.radioExcel')
				" :selectMacData="selectMacData"></EDExport>
		<EEExport style="z-index: 9"
			v-if="export_dialog_flag && this.title == $t('message.reportFrom.exportItemTitle45')"
			@CloseExprotDiloag="export_dialog_flag = false" @ExprotItem="exprotDialogItem" :title="title"
			:fileRadio="fileRadio" :fileTypeStr="fileRadio == 1
				? $t('message.reportFrom.exportFileRadio.radioPdf')
				: $t('message.reportFrom.exportFileRadio.radioExcel')
				" :selectMacData="selectMacData"></EEExport>

		<FAExport v-if="export_dialog_flag && this.title == $t('message.reportFrom.exportItemTitle47')"
			@CloseExprotDiloag="export_dialog_flag = false" :title="title" :fileRadio="fileRadio" :fileTypeStr="fileRadio == 2
				? $t('message.reportFrom.exportFileRadio.radioPdf')
				: $t('message.reportFrom.exportFileRadio.radioExcel')
				" :selectMacData="selectMacData"></FAExport>

		<FBExport v-if="export_dialog_flag && this.title == $t('message.reportFrom.exportItemTitle48') && flg == 5"
			@CloseExprotDiloag="export_dialog_flag = false" :title="title" :fileRadio="fileRadio" :fileTypeStr="fileRadio == 2
				? $t('message.reportFrom.exportFileRadio.radioPdf')
				: $t('message.reportFrom.exportFileRadio.radioExcel')
				" :selectMacData="selectMacData"></FBExport>

		<FCExport v-if="export_dialog_flag && this.title == $t('message.reportFrom.exportItemTitle49') && flg == 5"
			@CloseExprotDiloag="export_dialog_flag = false" :title="title" :fileRadio="fileRadio" :fileTypeStr="fileRadio == 2
				? $t('message.reportFrom.exportFileRadio.radioPdf')
				: $t('message.reportFrom.exportFileRadio.radioExcel')
				" :selectMacData="selectMacData"></FCExport>

		<FDExport v-if="export_dialog_flag && this.title == $t('message.reportFrom.exportItemTitle50')"
			@CloseExprotDiloag="export_dialog_flag = false" :title="title" :fileRadio="fileRadio" :fileTypeStr="fileRadio == 2
				? $t('message.reportFrom.exportFileRadio.radioPdf')
				: $t('message.reportFrom.exportFileRadio.radioExcel')
				" :selectMacData="selectMacData"></FDExport>

		<FEExport v-if="export_dialog_flag && this.title == $t('message.reportFrom.exportItemTitle51')"
			@CloseExprotDiloag="export_dialog_flag = false" :title="title" :fileRadio="fileRadio" :fileTypeStr="fileRadio == 2
				? $t('message.reportFrom.exportFileRadio.radioPdf')
				: $t('message.reportFrom.exportFileRadio.radioExcel')
				" :selectMacData="selectMacData"></FEExport>

		<FFExport v-if="export_dialog_flag && this.title == $t('機器カルテ')"
			@CloseExprotDiloag="export_dialog_flag = false" :title="title" :fileRadio="fileRadio" :fileTypeStr="fileRadio == 2
				? $t('message.reportFrom.exportFileRadio.radioPdf')
				: $t('message.reportFrom.exportFileRadio.radioExcel')
				" :selectMacData="selectMacData"></FFExport>
		<FGExport v-if="export_dialog_flag && this.title == $t('評価グラフ')"
			@CloseExprotDiloag="export_dialog_flag = false" :title="title" :fileRadio="fileRadio" :fileTypeStr="fileRadio == 2
				? $t('message.reportFrom.exportFileRadio.radioPdf')
				: $t('message.reportFrom.exportFileRadio.radioExcel')
				" :selectMacData="selectMacData"></FGExport>
	</div>
</template>

<script>
import eventBus from "@/eventBus/bus";
import ExportDialog from "./ExportDialog.vue";
import AAExport from "./Export/A_A_Export";
import ACExport from "./Export/A_C_Export";

import BAExport from "./Export/B_A_Export";
import BBExport from "./Export/B_B_Export";
import BCExport from "./Export/B_C_Export";
import BDExport from "./Export/B_D_Export";
import BEExport from "./Export/B_E_Export";

import CAExport from "./Export/C_A_Export";
import CBExport from "./Export/C_B_Export";
import CCExport from "./Export/C_C_Export";
import CDExport from "./Export/C_D_Export";
import CEExport from "./Export/C_E_Export";

import DAExport from "./Export/D_A_Export";
import DBExport from "./Export/D_B_Export";
import DCExport from "./Export/D_C_Export";
import DDExport from "./Export/D_D_Export";

import EAExport from "./Export/E_A_Export";
import ECExport from "./Export/E_C_Export";
import EDExport from "./Export/E_D_Export";
import EEExport from "./Export/E_E_Export";

import FAExport from "./Export/F_A_Export";
import FBExport from "./Export/F_B_Export";
import FCExport from "./Export/F_C_Export";
import FDExport from "./Export/F_D_Export";
import FEExport from "./Export/F_E_Export";
import FFExport from "./Export/F_F_Export";
import FGExport from "./Export/F_G_Export";
import { getLocalStorage } from "@/utils/storage";
export default {
	name: "Export",
	props: {
		isShowDmgBtn: Boolean,
	},
	data() {
		return {
			flg: -1,
			export_item_arr: [
				{
					title: this.$t("message.reportFrom.exportItemTitle0"),
					titleFlg: false,
					children: [
						{
							title: this.$t(
								"message.reportFrom.exportItemTitle01"
							),
							_api: "",
							btn: true,
							flg: 0
							// tempDis: true
						},
						// {
						// 	title: this.$t(
						// 		"message.reportFrom.exportItemTitle02"
						// 	),
						// 	_api: "",
						// 	btn: true,
						// flg: 0
						// 	tempDis: true
						// },
						{
							title: this.$t(
								"message.reportFrom.exportItemTitle03"
							),
							_api: "",
							btn: true,
							flg: 0
						},
					],
				},
				{
					title: this.$t("message.reportFrom.exportItemTitle1"),
					children: [
						{
							title: this.$t(
								"message.reportFrom.exportItemTitle11"
							),
							_api: "",
							btn: true,
							flg: 1
						},
						{
							title: this.$t(
								"message.reportFrom.exportItemTitle12"
							),
							_api: "",
							btn: true,
							flg: 1
						},
						{
							title: this.$t(
								"message.reportFrom.exportItemTitle_12"
							),
							_api: "",
							btn: true,
							flg: 1
						},
						{
							title: this.$t(
								"message.reportFrom.exportItemTitle13"
							),
							_api: "",
							btn: true,
							flg: 1
						},
						{
							title: this.$t(
								"message.reportFrom.exportItemTitle16"
							),
							_api: "",
							btn: true,
							flg: 1,
							titleFlg: false,
							titleFlg1: true,
						},
						// {
						// 	title: this.$t(
						// 		"message.reportFrom.exportItemTitle14"
						// 	),
						// 	_api: "",
						// 	btn: true,
						// flg: 1
						// },
						// {
						// 	title: this.$t(
						// 		"message.reportFrom.exportItemTitle15"
						// 	),
						// 	_api: "",
						// 	btn: true,
						// flg: 1
						// },
					],
				},
				{
					title: this.$t("message.reportFrom.exportItemTitle2"),
					children: [
						{
							title: this.$t(
								"message.reportFrom.exportItemTitle21"
							),
							_api: "",
							btn: true,
							// tempDis: true
							flg: 2
						},
						{
							title: this.$t(
								"message.reportFrom.exportItemTitle22"
							),
							_api: "",
							btn: true,
							// tempDis: true
							flg: 2
						},
						{
							title: this.$t(
								"message.reportFrom.exportItemTitle25"
							),
							_api: "",
							btn: true,
							// tempDis: true
							flg: 2
						},
						{
							title: this.$t(
								"message.reportFrom.exportItemTitle23"
							),
							_api: "",
							btn: true,
							// tempDis: true
							flg: 2
						},
						{
							title: this.$t(
								"message.reportFrom.exportItemTitle24"
							),
							_api: "",
							btn: true,
							// tempDis: true
							flg: 2
						},
					],
				},
				{
					title: this.$t("message.reportFrom.exportItemTitle3"),
					children: [
						{
							title: this.$t(
								"message.reportFrom.exportItemTitle31"
							),
							_api: "",
							btn: true,
							flg: 3
						},
						{
							title: this.$t(
								"message.reportFrom.exportItemTitle32"
							),
							_api: "",
							btn: true,
							flg: 3
						},
						{
							title: this.$t(
								"message.reportFrom.exportItemTitle33"
							),
							_api: "",
							btn: true,
							flg: 3
						},
						{
							title: this.$t(
								"message.reportFrom.exportItemTitle34"
							),
							_api: "",
							btn: true,
							flg: 3
						},
						// {
						// 	title: this.$t(
						// 		"message.reportFrom.exportItemTitle35"
						// 	),
						// 	_api: "",
						// btn: true,
						// flg: 3
						// },
					],
				},
				{
					title: this.$t("message.reportFrom.exportItemTitle4"),
					children: [
						{
							title: this.$t(
								"message.reportFrom.exportItemTitle41"
							),
							_api: "",
							btn: true,
							flg: 4
						},
						{
							title: this.$t(
								"message.reportFrom.exportItemTitle42"
							),
							_api: "",
							btn: true,
							flg: 4
						},
						{
							title: this.$t(
								"message.reportFrom.exportItemTitle43"
							),
							_api: "",
							btn: true,
							flg: 4
						},
						{
							title: this.$t(
								"message.reportFrom.exportItemTitle44"
							),
							_api: "",
							btn: true,
							flg: 4
							// tempDis: true
						},
						{
							title: this.$t(
								"message.reportFrom.exportItemTitle45"
							),
							_api: "",
							btn: true,
							flg: 4
							// tempDis: true
						},
					],
				},
				{
					title: this.$t(
						"message.reportFrom.exportItemTitle46"
					),
					children: [
						{
							title: this.$t(
								"message.reportFrom.exportItemTitle47"
							),
							_api: "",
							btn: true,
							// tempDis: true
							flg: 5
						},
						{
							title: this.$t(
								"message.reportFrom.exportItemTitle48"
							),
							_api: "",
							btn: true,
							// tempDis: true
							flg: 5
						},
						{
							title: this.$t(
								"message.reportFrom.exportItemTitle49"
							),
							_api: "",
							btn: true,
							// tempDis: true
							flg: 5
						},
						{
							title: this.$t(
								"message.reportFrom.exportItemTitle50"
							),
							_api: "",
							btn: true,
							// tempDis: true
							flg: 5
						},
						{
							title: this.$t(
								"message.reportFrom.exportItemTitle51"
							),
							_api: "",
							btn: true,
							// tempDis: true
							flg: 5
						},
						{
							title: this.$t(
								"機器カルテ"
							),
							_api: "",
							btn: true,
							// tempDis: true
							flg: 5
						},
						{
							title: this.$t(
								"評価グラフ"
							),
							_api: "",
							btn: true,
							// tempDis: true
							flg: 5,
							titleFlg: false,
							titleFlg2: true,
						},
					],
				},
			],
			btnActiveClass: true,
			selectTitle: "",
			// 导出文件类型 2 excel  1 pdf
			fileRadio: "1",
			selectfileRadioStr: this.$t(
				"message.reportFrom.exportFileRadio.radioPdf"
			),
			// 2 所有机器  1 选中的机器
			selectRadio: "1",
			selectSelectRadioStr: this.$t(
				"message.reportFrom.exportFileRadio.justSelected"
			),

			value: 30,
			radioDisabledTop: false,
			radioDisabledBottom: false,
			rowDisabledIpt: true,

			leftListData: {},

			export_dialog_flag: false,

			import_dialog_flag: false,
			api: null,
			title: '',

			fullscreenLoading: false,

			selectPlantData: {},
			selectMacData: [],
			dmgFlg: false,
			LineNoFlg: false,
			SysIntelligenceFlg: false,

		};
	},
	components: {
		"export-dialog": ExportDialog,
		AAExport, ACExport,
		BAExport, BBExport, BCExport, BDExport, BEExport,
		CAExport, CBExport, CCExport, CDExport, CEExport,
		DAExport, DBExport, DCExport, DDExport,
		EAExport, ECExport, EDExport, EEExport,
		FAExport, FBExport, FCExport, FDExport, FEExport, FFExport, FGExport,
		// "import-dialog": ImportDialog,
	},
	watch: {
		"$store.state.macType"(val) {
			for (let i = 0; i < this.export_item_arr.length; i++) {
				let item = this.export_item_arr[i];
				item.children.forEach(w => {
					w.btn = true;
				})
			}

		},
		fileRadio(val) {
			this.selectfileRadioStr =
				val == "1"
					? this.$t("message.reportFrom.exportFileRadio.radioPdf")
					: this.$t("message.reportFrom.exportFileRadio.radioExcel");
		},

		selectRadio(val) {
			console.log(val, "@@@@@@@@@")
			if (val == 2) {
				eventBus.$emit("selectValue", true)
			} else {
				eventBus.$emit("selectValue", false)
			}
			this.selectSelectRadioStr =
				val == "1"
					? this.$t("message.reportFrom.exportFileRadio.justSelected")
					: this.$t("message.reportFrom.exportFileRadio.allSelected");
		},
		selectMacData(val) {
			console.log(val);
			if (val.length > 0) {
				console.log(this.dmgFlg, this.LineNoFlg);
				if (this.dmgFlg) {
					this.export_item_arr[0].children.forEach(item => {
						item.btn = false;
					});
				} else if (this.LineNoFlg) {
					this.export_item_arr[1].children[4].btn = false;
				} else if (this.SysIntelligenceFlg) {
					this.export_item_arr[5].children[6].btn = false;
				} else {
					for (let i = 1; i < this.export_item_arr.length; i++) {
						let item = this.export_item_arr[i];
						item.children.forEach(w => {
							w.btn = false;
						})
					}
					this.export_item_arr[1].children[4].btn = true;
					this.export_item_arr[5].children[6].btn = true;
					if (this.$store.state.macType == 2) {
						this.export_item_arr[1].children[0].btn = true;
						this.export_item_arr[5].children[5].btn = true;
					}
				}
			} else {
				for (let i = 0; i < this.export_item_arr.length; i++) {
					let item = this.export_item_arr[i];
					item.children.forEach(w => {
						w.btn = true;
					})
				}
			}
		},
	},
	methods: {
		isChangeLineNo(e) {
			this.selectMacData = [];
			this.LineNoFlg = e;

			if (this.SysIntelligenceFlg) {
            this.SysIntelligenceFlg = false;
            this.isChangeSysIntelligence(false);
        	}

			if (e) {
				this.export_item_arr[0].titleFlg = false;
				this.export_item_arr[5].children[6].titleFlg = false;
			}

			this.$emit("changeLineNo", !e);
			this.$emit("changeDogBtn", !this.export_item_arr[0].titleFlg);

			this.dmgFlg = this.export_item_arr[0].titleFlg;
			this.SysIntelligenceFlg = this.export_item_arr[5].children[6].titleFlg;


		},
		isChange(e) {
			this.selectMacData = [];
			this.dmgFlg = e;

			if (this.SysIntelligenceFlg) {
            this.SysIntelligenceFlg = false;
            this.isChangeSysIntelligence(false);
       		}

			if (e) {
				this.export_item_arr[1].children[4].titleFlg = false;
				this.export_item_arr[5].children[6].titleFlg = false;
			}
			this.$emit("changeDogBtn", !e);
			this.$emit("changeLineNo", !this.export_item_arr[1].children[4].titleFlg);
			this.LineNoFlg = this.export_item_arr[1].children[4].titleFlg;
			this.SysIntelligenceFlg = this.export_item_arr[5].children[6].titleFlg;

		},

		isChangeSysIntelligence(e) {
			this.selectMacData = [];
			this.SysIntelligenceFlg = e;

			if (e) {
				this.export_item_arr[0].titleFlg = false;
				this.export_item_arr[1].children[4].titleFlg = false;
			}

			this.$emit("changeSysIntelligence", !e);
			this.$emit("changeDogBtn", !this.export_item_arr[0].titleFlg);
			this.$emit("changeLineNo", !this.export_item_arr[1].children[4].titleFlg);
			this.dmgFlg = this.export_item_arr[0].titleFlg;
			this.LineNoFlg = this.export_item_arr[1].children[4].titleFlg;
		},
		
		excelBtnClick(type) {
			// 导入
			if (type === "top") {
				this.radioDisabledTop = false;
				this.radioDisabledBottom = false;
				this.rowDisabledIpt = false;
				this.towRowChange(1);
			} else {
				// 导出
				this.radioDisabledTop = true;
				this.radioDisabledBottom = true;
				this.rowDisabledIpt = true;
				this.radioTow = "2";
				this.radio = "1";
				this.value = 30;
			}
		},
		towRowChange(type) {
			if (type === 1) {
				this.rowDisabledIpt = true;
				this.radioDisabledTop = false;
			} else {
				this.rowDisabledIpt = false;
				this.radioDisabledTop = true;
			}
		},
		exportItem(i) {
			console.log(i)
			// message.reportFrom.exportItemTitle42
			this.flg = i.flg;
			this.title = i.title;
			this.api = i._api;
			if (!this.btnActiveClass) {
				this.import_dialog_flag = true;
				return;
			}

			if (this.selectMacData.length > 0 || i.title == this.$t("message.reportFrom.exportItemTitle01")){
				this.export_dialog_flag = true;
			}
		},
		exprotDialogItem(data) {
			console.log(data, "exprotDialogItemData");
			switch (this.title) {
				default:
					this.$alert(this.$t("we will support soon."), '', {
						confirmButtonText: 'OK',
						type: 'warning',
					});
					return;
			}
		},

		//验证输入
		changeInput() {
			var pattern = /^[1-9][0-9]*$/; // 正整数的正则表达式
			// 不符合正整数时
			if (!pattern.test(this.value)) {
				// input 框绑定的内容为空
				this.value = "";
			}
		},
	},
	created() { },
	mounted() {
		let _this = this;
		// eventBus.$on("leftListData", (res) => {
		// 	if (res) {
		// 		_this.leftListData = res;
		// 	} else {
		// 		_this.leftListData = {
		// 			row: {
		// 				ctgCode: null,
		// 				dwgID: null,
		// 				impCode: null,
		// 				indoorAddr: null,
		// 				indoorID: null,
		// 				macCode: "",
		// 				macName: this.$store.state.excelMacName,
		// 				name: this.$store.state.excelMacNameb,
		// 				pltCode: this.$store.state.excelPltCode,
		// 				macType: this.$store.state.excelMacType,
		// 			},
		// 			data: [],
		// 		};
		// 	}
		// 	console.log(_this.leftListData, "---------");
		// });

		eventBus.$on("reportformLeftChangePlant", (res) => {
			this.selectPlantData = res;
		});

		eventBus.$on("reportformLeftMacSelect", (res) => {
			this.selectMacData = res;
		});
	},
	beforeDestroy() {
		eventBus.$off("reportformLeftChangePlant");
		eventBus.$off("reportformLeftMacSelect");
	},
};
</script>
<style lang="scss" scoped>
.export-container {
	height: 100%;
}

.container {
	width: 100%;
	height: 100%;

	.nav {
		width: 100%;
		// height: 32px;
		display: flex;
		align-items: center;
		margin-top: 16px;
	}

	.nav:nth-child(2) {
		margin-top: 30px;
	}

	.tabs-container {
		display: flex;
		align-items: center;
		justify-content: flex-start;
		width: 344px;
		min-height: 32px;
		border: 1px solid #d3d3d3;
		background: #fff;
		border-radius: 4px;
		margin-right: 24px;

		button {
			width: 50%;
			height: 32px;
			display: flex;
			align-items: center;
			justify-content: center;
			cursor: pointer;
		}

		button:nth-child(1) {
			border-right: 1px solid #d3d3d3;
		}

		.activeBtn {
			background: #106ebe;
			color: #fff;
		}

		::v-deep .el-radio {
			width: 50%;
			height: 32px;
			display: flex;
			align-items: center;
			justify-content: center;
			margin: 0;
		}
	}

	.isSelect {
		background: #f8f8f8;
	}

	.row-input {
		display: flex;
		align-items: center;
		justify-content: flex-start;

		span {
			color: #333333;
		}

		::v-deep .el-input {
			width: 48px;
			height: 32px;
			margin: 0 8px;
		}

		::v-deep .el-input__inner {
			width: 48px;
			height: 32px;
		}

		::v-deep .el-input__inner.disabled:hover {
			cursor: pointer;
		}
	}

	.active-row-input {
		::v-deep .el-input__inner {
			background: rgb(255, 255, 225);
		}
	}

	.export-item-container {
		width: 100%;
		display: flex;
		// align-items: center;
		justify-content: flex-start;
		margin-top: 10px;

		.item-container {
			width: 190px;
			margin-right: 24px;

			.item {
				width: 100% !important;
				height: 32px;
				margin-bottom: 12px;
				// color: rgba(0, 0, 0, 0.65);
				display: flex;
				align-items: center;
				line-height: 0px;
				justify-content: center;
				// background: #fff;
				// border: 1px solid #d3d3d3;
				border-radius: 4px;
				// cursor: pointer;
			}

			.item-nth-child {
				width: 100%;
				height: 32px;
				display: flex;
				align-items: center;
				justify-content: center;
				font-weight: bold;
				color: #1f2329;
				background: none;
				border: 0 none;
				margin: 0;
				cursor: text;

				::v-deep .el-checkbox {
					font-weight: bold;
					color: #1f2329;
					transform: translateX(-14px);
				}

				::v-deep .el-checkbox__input {
					transform: translateX(-8px);
				}

			}
		}
	}
}
</style>
